﻿#ifndef DEPTDAO_H
#define DEPTDAO_H

#include <QObject>
#include <dept.h>

class DeptDao
{
public:
    DeptDao(QSqlDatabase sqlDatabase);
    ~DeptDao();
    bool getListByPid(QList<Dept> &list,uint64_t parentId);
    bool getList(QList<Dept> &list);
    bool getListByPageAndParam(QList<Dept> &list,const  uint64_t &page,const  uint64_t &pageSize);
    bool getTotalByParam(uint64_t &total);
    bool getOne(Dept &object);
    bool saveOne(Dept &object);
    bool deleteOne(Dept &object);
private:
    QSqlDatabase db;
};

#endif // DEPTDAO_H
